package com.coldchain.order.entity;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDateTime;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;

/**
 * <p>
 * 企业结算订单
 * </p>
 *
 * @author fangliai
 * @since 2018-09-25
 */
public class CreditOrder implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "credit_id", type = IdType.AUTO)
    private Long creditId;

    /**
     * 企业ID
     */
    private String userId;

    /**
     * 价格
     */
    private BigDecimal price;

    /**
     * 订单数量
     */
    private Integer orderCount;

    /**
     * -1未结算0已结算
     */
    private Integer status;

    /**
     * 结算方式
     */
    private Integer settlementPay;

    /**
     * 结算时间
     */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date settlementTime;

    /**
     * 出单时间
     */
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createtime;

    /**
     * 版本
     */
    private Integer version;
    /**
     * 结算订单号
     */
    private String targetid;
    @TableField(exist=false)
    private Long starttime;
    @TableField(exist=false)
    private Long endtime;
    
    public Long getStarttime() {
		return starttime;
	}
	public void setStarttime(Long starttime) {
		this.starttime = starttime;
	}
	public Long getEndtime() {
		return endtime;
	}
	public void setEndtime(Long endtime) {
		this.endtime = endtime;
	}
	public void setTargetid(String targetid) {
		this.targetid = targetid;
	}
    public String getTargetid() {
		return targetid;
	}
    public Long getCreditId() {
        return creditId;
    }

    public void setCreditId(Long creditId) {
        this.creditId = creditId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Integer getOrderCount() {
        return orderCount;
    }

    public void setOrderCount(Integer orderCount) {
        this.orderCount = orderCount;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getSettlementPay() {
        return settlementPay;
    }

    public void setSettlementPay(Integer settlementPay) {
        this.settlementPay = settlementPay;
    }

    public Date getSettlementTime() {
        return settlementTime;
    }

    public void setSettlementTime(Date settlementTime) {
        this.settlementTime = settlementTime;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

}
